package cn.itcast.bos.web.action.base;

import cn.itcast.bos.domain.base.Standard;
import cn.itcast.bos.service.base.StandardService;
import cn.itcast.bos.web.action.commen.BaseAction;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import java.util.List;

@Controller
@ParentPackage(value = "struts-default")
@Namespace("/")
@Scope("prototype")
public class StandardAction extends BaseAction<Standard> {
    @Autowired
    private StandardService standardServiceImpl;
    @Action(value = "standard_save",results = {@Result(name = "success",location ="./pages/base/standard.html",type = "redirect")})
    public String save(){
        standardServiceImpl.save(model);
        return SUCCESS;
    }


}
